package mainPackage;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.Timer;


public class Chrono  implements ActionListener
{
	private Timer	timer		;
	private int		timeCount	;
	
	public Chrono( ) 
	{
		super();
		this.timer = new Timer(1000 , this );
	}

 
	public void actionPerformed(ActionEvent arg0) 
	{
		this.timeCount++;
	}	
	
	public void start()
	{
		this.timeCount = 0 ;
		this.timer.start();
	}
	
	public int stop()
	{
		this.timer.stop();
		return this.timeCount;
	}

}
